function y = filter_bank(x, window, hop)

figure;

y=x;

ftype = 'butt'

y.spectral.delta{1}=0.008;
y.spectral.delta{2}=0.0065;
y.spectral.delta{3}=0.008;
y.spectral.delta{4}=0.03;

y.spectral.filt{1} = band_pass(y.signal, y.fs, ftype, 20, 630);
y.spectral.filt{2} = band_pass(y.signal, y.fs, ftype, 630, 1720);
y.spectral.filt{3} = band_pass(y.signal, y.fs, ftype, 1720, 4400);
y.spectral.filt{4} = band_pass(y.signal, y.fs, ftype, 4400, 15500);

subplot(5,1,1, 'v6'),
plot(y.signal, 'r'),
hold on,
plot(y.retification.onsets*hop, zeros(length(y.retification.onsets), 1), 'ks'),
title('Sinal Original');

subplot(5,1,2),
plot(y.spectral.filt{1}, 'r');

subplot(5,1,3),
plot(y.spectral.filt{2}, 'r');

subplot(5,1,4),
plot(y.spectral.filt{3}, 'r');

subplot(5,1,5),
plot(y.spectral.filt{4}, 'r');

num_filt = length(y.spectral.filt);

for i=1:num_filt
	y.spectral.dif{i} = onset_detection(y.spectral.filt{i}, y.fs, window, hop);
	y.spectral.onsets{i} = find_peaks(abs(y.spectral.dif{i}), y.spectral.delta{i}, y.fs/hop);
	subplot(5,1,(i+1)), hold on, plot(y.spectral.onsets{i}*hop, zeros(1,length(y.spectral.onsets{i})), 'ks')
end
